#!/usr/bin/python3
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*-

import sys
import mrget
sys.path.append('/usr/lib64/fpemud-os-sysman')
from helper_pkg_warehouse import PkgWarehouse
from helper_pkg_warehouse import EbuildRepositories
from helper_pkg_warehouse import EbuildOverlays


mrget.init(system_or_user=True)

overlayName = sys.argv[3]
overlayVcsType = sys.argv[4]
overlayUrl = sys.argv[5]
EbuildOverlays().addTransientOverlay(overlayName, overlayVcsType, overlayUrl)
sys.exit(0)

if item == "enable-overlay-package":
    packageList = sys.argv[4:]
    layman = EbuildOverlays()
    for pkg in packageList:
        print("        - \"%s\"..." % (pkg))
        layman.enableOverlayPackage(overlayName, pkg, quiet=True)
    sys.exit(0)

assert False
